﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using permit.App_Code.DataAccess;
using permit.App_Code.Entity;


namespace permit.print
{
    public partial class Confirm : System.Web.UI.Page
    {
        PermitAccess perAcc = new PermitAccess();
        protected void Page_Load(object sender, EventArgs e)
        {


        }

        protected void btnOK_Click(object sender, EventArgs e)
        {
            PermitTable permit = new PermitTable();
            permit.Per_ID =  Convert.ToInt32(Session["Per_ID"]);
            permit.Per_Count = 1;
            permit.Per_Printer = ((UserTable)Session["UserTable"]).NAME;
            int count = perAcc.UpdatePermitInfo(permit);
            if(count > 0)                   
            Response.Redirect("~/main/default.aspx");
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/Main.aspx?Sturt=Printer");
            
        }
    }
}
